#include <stdlib.h>
#include <stdio.h>

int main()
{
	FILE *fpe;
	unsigned char data;
	int len;


	if((fpe = fopen("in.dat", "w")) == NULL)
	{
		return -1;
	}

	len =0;
	data = 0xff;
	do 
	{
		if(len==10)
		{
			break;
		}
		++len;
		fputc(data, fpe);
	}while(1);

	fflush(fpe);

	fclose(fpe);

	printf("\r\nlen:%d\r\n",len);
	return 0;
}
